<{include file="admin/statis/header.tpl"}>
        <div class="box02">
			<{include file="admin/statis/navigator.tpl"}>	

            <{if $function_name == 'total'}>
				<{include file="admin/statis/statis_total.tpl"}>
			<{/if}>

            <{if $function_name == 'access'}>
				<{include file="admin/statis/statis_access.tpl"}>
			<{/if}>

			<{if $function_name == 'transacts'}>
				<{include file="admin/statis/statis_transacts.tpl"}>
			<{/if}>

			<{if $function_name == 'user_behavior'}>
				<{include file="admin/statis/statis_behavior.tpl"}>
			<{/if}>

			<{if $function_name == 'shop_daily'}>
				<{include file="admin/statis/statis_shop.tpl"}>
			<{/if}>

            <{if $function_name == 'transact'}>
			<div class="box02_1">
				<span style="float:right;font-size:14px;font-weight:bolder;">
					<a href="/statis/transact/<{$pre_month}>"><{$pre_month}></a>&nbsp;&nbsp;<{$cur_month}>&nbsp;&nbsp;<a href="/statis/transact/<{$next_month}>"><{$next_month}></a>
				</span>
				<span style="font-size:18px;">交易数据：<br/></span>

                日付款统计数据:
				<div class="box02_Tab">
                	<div class="table01">
                    	<table cellpadding="0" cellspacing="0" width="100%" border="0" id="table">
                        <tr class="th">
                        <th><div>日期</div></th>
						<th><div><span title="付款日期为当天的订单数量">付款订单</span></div></th>
						<th><div><span title="付款日期为当天的总金额">付款金额</span></div></th>
						<th><div><span title="付款日期为当天的商品数量">付款商品</span></div></th>
						<th><div><span title="付款日期为当天的买家数量">付款买家</span></div></th>
						<th><div><span title="下单日期为当天的未支付订单数量">未支付订单</span></div></th>
						<th><div><span title="下单日期为当天的未支付商品数">未支付商品</span></div></th>
						<th><div><span title="下单日期为当天的未支付买家数">未支付买家</span></div></th>
						</tr>
                        <{if $datas | @count > 0}>
						<{foreach from=$datas key=key item=item}>
						<tr>
						<td><{if $key==0}>总计 <{else}><{$key}><{/if}></td>
						<td><{foreach from=$item item=o1}><{if $o1.type==34}><{if $key}><a href="/orders/list?create_time_greater=<{$key}>&create_time_less=<{$key}>&pay_status[]=paid&pay_status[]=sent&pay_status[]=received&pay_status[]=merchant_confirmed"><{/if}><{$o1.today_orders}><{if $key}></a><{/if}><{/if}><{/foreach}></td>
						<td><{foreach from=$item item=o3}><{if $o3.type==34}><{if $key}><a href="/orders/list?create_time_greater=<{$key}>&create_time_less=<{$key}>&pay_status[]=paid&pay_status[]=sent&pay_status[]=received&pay_status[]=merchant_confirmed"><{/if}><{$o3.today_money}><{if $key}></a><{/if}><{/if}><{/foreach}></td>
						<td><{if $key == 0}><{$total_datas.$month.34.goods}><{else}><{foreach from=$item item=o2}><{if $o2.type==34}><{$o2.today_goods}><{/if}><{/foreach}><{/if}></td>
						<td><{if $key == 0}><{$total_datas.$month.34.buyers}><{else}><{foreach from=$item item=o4}><{if $o4.type==34}><{$o4.today_buyers}><{/if}><{/foreach}><{/if}></td>
						<td><{foreach from=$item item=o5}><{if $o5.type==33}><{if $key}><a href="/orders/list?create_time_greater=<{$key}>&create_time_less=<{$key}>" title="查看当天所有下单数" target="_blank"><{/if}><{$o5.today_orders}><{if $key}></a><{/if}><{/if}><{/foreach}></td>
						<td><{if $key == 0}><{$total_datas.$month.33.goods}><{else}><{foreach from=$item item=o6}><{if $o6.type==33}><{$o6.today_goods}><{/if}><{/foreach}><{/if}></td>
						<td><{if $key == 0}><{$total_datas.$month.33.buyers}><{else}><{foreach from=$item item=o7}><{if $o7.type==33}><{$o7.today_buyers}><{/if}><{/foreach}><{/if}></td>
						</tr>
						<{/foreach}>
						<{/if}>
                        </table>
                    </div>
                </div>
				月付款统计数据：
				<div class="box02_Tab">
                	<div class="table01">
                    	<table cellpadding="0" cellspacing="0" width="100%" border="0" id="table">
                        <tr class="th">
                        <th><div>月份</div></th>
						<th><div>付款订单</div></th>
						<th><div>付款金额</div></th>
						<th><div>付款商品数</div></th>
						<th><div>付款买家数</div></th>
						<th><div>下单数</div></th>
						<th><div>下单商品</div></th>
						<th><div>下单买家数</div></th>
						</tr>
                        <{if $month_datas | @count > 0}>
						<{foreach from=$month_datas key=key item=item}>
						<tr>
						<td><{if $key==0}>总计 <{else}><{$key}><{/if}></td>
						<td><{foreach from=$item item=o1}><{if $o1.type==34}><{$o1.today_orders}><{/if}><{/foreach}></td>
						<td><{foreach from=$item item=o3}><{if $o3.type==34}><{$o3.today_money}><{/if}><{/foreach}></td>
						<td><{$total_datas.$key.34.goods}></td>
						<td><{$total_datas.$key.34.buyers}></td>
						<td><{foreach from=$item item=o5}><{if $o5.type==33}><{$o5.today_orders}><{/if}><{/foreach}></td>
						<td><{$total_datas.$key.33.goods}></td>
						<td><{$total_datas.$key.33.buyers}></td>
						</tr>
						<{/foreach}>
						<{/if}>
                        </table>
                    </div>
                </div>

				日交易成功统计数据:
				<div class="box02_Tab">
                	<div class="table01">
                    	<table cellpadding="0" cellspacing="0" width="100%" border="0" id="table">
                        <tr class="th">
                        <th><div>日期</div></th>
						<th><div>买家确认收货订单数</div></th>
						<th><div>买家确认收货金额</div></th>
						<th><div>买家确认收货商品数</div></th>
						<th><div>确认收货买家数</div></th>
						</tr>
                        <{if $datas | @count > 0}>
						<{foreach from=$datas key=key item=item}>
						<tr>
						<td><{if $key==0}>总计 <{else}><{$key}><{/if}></td>
						<td><{foreach from=$item item=o1}><{if $o1.type==153}><{$o1.today_orders}><{/if}><{/foreach}></td>
						<td><{foreach from=$item item=o3}><{if $o3.type==153}><{$o3.today_money}><{/if}><{/foreach}></td>
						<td><{if $key == 0}><{$total_datas.$month.153.goods}><{else}><{foreach from=$item item=o2}><{if $o2.type==153}><{$o2.today_goods}><{/if}><{/foreach}><{/if}></td>
						<td><{if $key == 0}><{$total_datas.$month.153.buyers}><{else}><{foreach from=$item item=o4}><{if $o4.type==153}><{$o4.today_buyers}><{/if}><{/foreach}><{/if}></td>
						</tr>
						<{/foreach}>
						<{/if}>
                        </table>
                    </div>
                </div>
				月交易成功统计数据：
				<div class="box02_Tab">
                	<div class="table01">
                    	<table cellpadding="0" cellspacing="0" width="100%" border="0" id="table">
                        <tr class="th">
                        <th><div>月份</div></th>
						<th><div>买家确认收货订单数</div></th>
						<th><div>买家确认收货金额</div></th>
						<th><div>买家确认收货商品数</div></th>
						<th><div>确认收货买家数</div></th>
						</tr>
                        <{if $datas | @count > 0}>
						<{foreach from=$month_datas key=key item=item}>
						<tr>
						<td><{if $key==0}>总计 <{else}><{$key}><{/if}></td>
						<td><{foreach from=$item item=o1}><{if $o1.type==153}><{$o1.today_orders}><{/if}><{/foreach}></td>
						<td><{foreach from=$item item=o3}><{if $o3.type==153}><{$o3.today_money}><{/if}><{/foreach}></td>
						<td><{$total_datas.$key.153.goods}></td>
						<td><{$total_datas.$key.153.buyers}></td>
						</tr>
						<{/foreach}>
						<{/if}>
                        </table>
                    </div>
                </div>


				日退款统计数据:
				<div class="box02_Tab">
                	<div class="table01">
                    	<table cellpadding="0" cellspacing="0" width="100%" border="0" id="table">
                        <tr class="th">
                        <th><div>日期</div></th>
						<th><div>退款订单数</div></th>
						<th><div>退款金额</div></th>
						<th><div>退款商品数</div></th>
						<th><div>退款买家数</div></th>
						</tr>
                        <{if $datas | @count > 0}>
						<{foreach from=$datas key=key item=item}>
						<tr>
						<td><{if $key==0}>总计 <{else}><{$key}><{/if}></td>
						<td><{foreach from=$item item=o1}>
						<{if $o1.type==130}>
							<{if $key==0}>
								<{$o1.today_orders}>
							<{else}>
								<a href="/orders/list/?update_time_greater=<{$key}>&update_time_less=<{$key}>&order_by=create_time&pay_status[]=merchant_confirmed" target="_blank"><{$o1.today_orders}></a>
							<{/if}>
						<{/if}>
						<{/foreach}></td>
						<td><{foreach from=$item item=o3}><{if $o3.type==130}><{$o3.today_money}><{/if}><{/foreach}></td>
						<td><{if $key == 0}><{$total_datas.$month.131.goods}><{else}><{foreach from=$item item=o2}><{if $o2.type==130}><{$o2.today_goods}><{/if}><{/foreach}><{/if}></td>
						<td><{if $key == 0}><{$total_datas.$month.131.buyers}><{else}><{foreach from=$item item=o4}><{if $o4.type==130}><{$o4.today_buyers}><{/if}><{/foreach}><{/if}></td>
						</tr>
						<{/foreach}>
						<{/if}>
                        </table>
                    </div>
                </div>
				月退款统计数据：
				<div class="box02_Tab">
                	<div class="table01">
                    	<table cellpadding="0" cellspacing="0" width="100%" border="0" id="table">
                        <tr class="th">
                        <th><div>月份</div></th>
						<th><div>退款订单数</div></th>
						<th><div>退款金额</div></th>
						<th><div>退款商品数</div></th>
						<th><div>退款买家数</div>
						</th>
						</tr>
                        <{if $datas | @count > 0}>
						<{foreach from=$month_datas key=key item=item}>
						<{php}>$url_end   = date('Y-m-d',strtotime('+1 month',strtotime($this->_tpl_vars['key']))-1);<{/php}>
						<tr>
						<td><{if $key==0}>总计 <{else}><{$key}><{/if}></td>
						<td><{foreach from=$item key=k item=o1}>
						<{if $o1.type==130}>
							<{if $key==0}>
								<{$o1.today_orders}>
							<{else}>
								<a href="/orders/list/?update_time_greater=<{$key}>-01&update_time_less=<{php}>echo $url_end;<{/php}>&order_by=create_time&pay_status[]=merchant_confirmed" target="_blank"><{$o1.today_orders}></a>
							<{/if}>
						<{/if}>
						<{/foreach}></td>
						<td><{foreach from=$item item=o3}><{if $o3.type==130}><{$o3.today_money}><{/if}><{/foreach}></td>
						<td><{$total_datas.$key.131.goods}></td>
						<td><{$total_datas.$key.131.buyers}></td>
						</tr>
						<{/foreach}>
						<{/if}>
                        </table>
                    </div>
                </div>
			
			<{/if}>
		<{if $function_name == 'members'}>
			<div class="box02_1">
				<span style="float:right;font-size:14px;font-weight:bolder;">
					<a href="/statis/members/<{$pre_month}>"><{$pre_month}></a>&nbsp;&nbsp;<{$cur_month}>&nbsp;&nbsp;<a href="/statis/members/<{$next_month}>"><{$next_month}></a>
				</span>
				<span style="font-size:18px;">用户数据：</span>
                <div class="box02_Tab">
                	<div class="table01">
                    	<table cellpadding="0" cellspacing="0" width="100%" border="0" id="table">
                        <tr class="th">
                        <th><div>日期</div></th>
						<th><div><span title="当日新注册的用户数量">今日注册用户数</span></div></th>
						<th><div><span title="截止目前总的用户数">累计用户数</span></div></th>
						<th><div><span title="当日申请成为商家的数量">今日注册商家数</span></div></th> 
						<th><div><span title="截止目前所有申请成为商家的数量">累计商家数</span></div></th>
						<th><div><span title="截止目前所有已开通的商家数量">累计已开通商家数</span></div></th>
						</tr>
                        <{if $datas | @count > 0}>
						<{foreach from=$datas key=key item=item}>
						<tr>
						<td><{$key}></td>
						<td><{$item.today_new_users}></td>
						<td><{$item.users}></td>
						<td><{$item.today_new_merchants}></td>
						<td><{$item.merchants}></td>
						<td><{$item.total_online_shops}></td>
						</tr>
						<{/foreach}>
						<{/if}>
                        </table>
                    </div>
                </div>
				月用户数据：
				<div class="box02_Tab">
                	<div class="table01">
                    	<table cellpadding="0" cellspacing="0" width="100%" border="0" id="table">
                        <tr class="th">
                        <th><div>日期</div></th>
						<th><div>注册用户数</div></th>
						<th><div>注册商家数</div></th> 
						</tr>
                        <{if $month_datas | @count > 0}>
						<{foreach from=$month_datas key=key item=item}>
						<tr>
						<td><{if $key == 0}>总计<{else}><{$key}><{/if}></td>
						<td><{$item.today_new_users}></td>
						<td><{$item.today_new_merchants}></td>
						</tr>
						<{/foreach}>
						<{/if}>
                        </table>
                    </div>
                </div>

			<{/if}>

			<{ if $function_name == 'goods'}>
				<{include file="admin/statis/statis_goods.tpl"}>
			<{/if}>

			<{ if $function_name == 'merchant_orders'}>
				<{include file="admin/statis/merchant_orders.tpl"}>
			<{/if}>

				</div>
            </div>
<{include file="admin/statis/footer.tpl"}>
